/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.source.entity.alarm;

import com.google.common.collect.Lists;
import com.thinkgem.jeesite.common.persistence.DataEntity;
import com.thinkgem.jeesite.modules.sys.entity.User;

import org.hibernate.validator.constraints.Length;

import java.util.List;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 * 警告资源管理Entity
 * @author ZC
 * @version 2017-04-23
 */
@XmlRootElement(name="alarmcfg")
public class EleSourceAlarmGroup extends DataEntity<EleSourceAlarmGroup> {
	
	private static final long serialVersionUID = 1L;

	private String name;		// 名称
	private String defaudio;		// 默认音频
	private List<EleSourceAlarm> eleSourceAlarmList = Lists.newArrayList();		// 子表列表
	public List<User> users = null;

	@XmlTransient
	public List<User> getUsers() {
		return users;
	}

	public void setUsers(List<User> users) {
		this.users = users;
	}
	public EleSourceAlarmGroup() {
		super();
	}

	public EleSourceAlarmGroup(String id){
		super(id);
	}
	@XmlTransient
	@Length(min=0, max=50, message="视频名称长度必须介于 0 和 50 之间")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@XmlElement(name = "defaudio")
	@Length(min=0, max=255, message="默认音频长度必须介于 0 和 255 之间")
	public String getDefaudio() {
		return defaudio;
	}

	public void setDefaudio(String defaudio) {
		this.defaudio = defaudio;
	}
	
	@XmlElement(name = "alarm")
	public List<EleSourceAlarm> getEleSourceAlarmList() {
		return eleSourceAlarmList;
	}

	public void setEleSourceAlarmList(List<EleSourceAlarm> eleSourceAlarmList) {
		this.eleSourceAlarmList = eleSourceAlarmList;
	}
}